<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Test extends CI_Controller {
	function __construct(){
		parent::__construct();
		
		if (($this->session->userdata('userid')>0) && ($this->session->userdata('hash')==md5($this->session->userdata('userid').$this->session->userdata('username')))){
			$this->headerdata['userid'] = $this->session->userdata('userid');
			$this->headerdata['username'] = $this->session->userdata('username');
		}else{
			$this->headerdata['userid'] = 0;
			$this->headerdata['username'] = 'Guest';
		}
		
		$this->headerdata['route'] = 'ThucTap.com';
		$this->headerdata['routelink'] = '';
	}
	
	function index(){
		$this->load->helper('excel');
		$row = array('1','2','test');
		$row1 = array('1','test','3');
		$row2 = array('test','2','3');
		$table = array($row,$row1,$row2);
		to_excel($table);
	}
}
?>